<template>
  <div class="edu-page-warp">
    <el-card shadow="never">
      <div class="edu-page-title">{{`${studentInfo.schoolYear}${studentInfo.college}${$t('graduationDesign.graduationDesignCourseSelection')} - ${studentInfo.studentTypeName}${$t('graduationDesign.studentList')}`}}</div>
      <div class="edu-opertion-bar">
        <div class="float-right">
          <el-button @click="onExport">{{$t('graduationDesign.export')}}</el-button>
        </div>
      </div>
      <edu-table ref="stuListTable" :data="studentData" :selection="false" :order="false" :pagination="false">
        <edu-table-column :label="$t('graduationDesign.studentId')" prop="studentId" min-width="90"></edu-table-column>
        <edu-table-column :label="$t('graduationDesign.name')" prop="studentName" min-width="90"></edu-table-column>
        <edu-table-column :label="$t('graduationDesign.selectedCourseNum')" prop="teachingClassCode" min-width="100" v-if="studentInfo.studentType === 'UNSELECTED_STU'"></edu-table-column>
        <edu-table-column :label="$t('graduationDesign.selectedCourseName')" prop="courseName" min-width="100" v-if="studentInfo.studentType === 'UNSELECTED_STU'"></edu-table-column>
      </edu-table>
    </el-card>
  </div>
</template>
<script>
export default {
  name: 'studentList',
  props: {
    studentData: {
      type: Array,
      default: []
    },
    studentInfo: {
      type: Object,
      default: {}
    }
  },
  data() {
    return {

    };
  },
  mounted() { },
  methods: {
    onExport() {
      const exportInfo = {
        list: this.studentData,
        type: this.studentInfo.studentType
      };
      this.$emit("stu-export", exportInfo);
    }
  }
}
</script>
<style lang="scss" scoped>
</style>
